package com.niiwoo.civet.trade.dto.kaola.response;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;

/**
 * Created by wangjichao on 2017/8/29.
 */
public class BaseResponse implements Serializable{

    public static final String SUCCESS_CODE = "0";

    private static final long serialVersionUID = -7812431405114795494L;

    private String code;

    private String msg;

    public BaseResponse() {
    }

    public BaseResponse(String code) {
        this.code = code;
    }

    public BaseResponse(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @JSONField(serialize = false)
    public boolean isSuccess(){
        return SUCCESS_CODE.equals(this.code);
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
